package config

import (
	"os"
	"strings"
)

const (
	test_file = `
	{
		"以下为通用配置":"--------------------------------------------",
		"serial_number":"1.0",
		"service_name":"recruitserver",
		"service_displayname":"recruitserver",
		"sercice_desc":"recruitserver",
		"http_port":"7091",
		"https_port":"8012",
		"db_url":"root:qwer@tcp(192.168.0.99:3306)/recruit_db?charset=utf8&parseTime=True&loc=Local",
		"leveldb_dir":"./database",
		"token_type":"nomal",
		"app_id":"wwwthings",
		"app_secret":"4EE0A9A43B9B911C067BEE5CC50A9972",
		"is_dev":true,
		"oauth2_url":"http://192.168.0.152:7001/oauth2/api/v1",
		"apiserver_url":"http://192.168.0.152:7031/apiserver/api/v1",
		"register_url":"http://192.168.0.152:7021/register/api/v1",
		"es_addr_url":"http://192.168.0.152:9200",
		"以下为逻辑配置":"--------------------------------------------",
		
		"wx_appid":"wxb6aba0317ab16d1f",
		"wx_secret":"8d6fc51d00a4ee06abc975c2641b9d5e",
		"wx_key":"3",
		"wx_mch_id":"4",
		"sign_api_key":"apiserver",
		"sms_appid":"C40190998",
		"sms_secret":"0f5d6e69abb15e600c6ad169f8681a98",
		"paper_qrcode_url":"www.baidu.com",
		"register_app_id":"apiserver",
		"baidu_key":"lqOtcENpxv3ToDCaIlEIDBUs",
		"baidu_secret":"Qdn7k1HON2IWVzB3GSo4uU98kgHeAXHV",
		"getui_appid":"Nd0EgNJdZL7CXu4shQane4",
		"getui_appkey":"VKGI1VBHjtA2AVeevTmiV5",
		"getui_mastersecret":"aoFZ1SvzOZ6tQ2KgDW9Du8",
		"cos_bucket":"mytest",
		"cos_appid":"1252338888",
		"cos_secretid":"AKIDfQNAmIbmkirvseGn9KK9nFQY1LVWY2Z2",
		"cos_secretkey":"pwyrgTBmEZwLm9RYUFpyyrQAnKvYG1jF",
		"cos_region":"ap-chengdu"
		}
		
`
)

//判断是否在测试环境下使用
func IsRunTesting() bool {
	if len(os.Args) > 1 {
		return strings.HasPrefix(os.Args[1], "-test")
	}
	return false
}
